<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" th:content="${@config.getKey('blog.index.keywords')}">
    <meta name="description" th:content="${@config.getKey('blog.index.description')}">
    <title th:text="${@config.getKey('blog.index.title')}"></title>
    <link rel="stylesheet" th:href="@{/ajax/libs/bootstrap/bootstrap.min.css}"/>
    <link rel="stylesheet" th:href="@{/blog/jxhx/css/base.css}" />

    <link rel="stylesheet" th:href="@{/blog/jxhx/css/m.css}" />
    <link rel="stylesheet" th:href="@{/ajax/libs/font-icon/icon.css}"/>
    <script th:src="@{/blog/jxhx/js/jquery-1.8.3.min.js}"></script>
    <script th:src="@{/blog/jxhx/js/comm.js}"></script>
    <script th:inline="javascript"> var ctx = [[@{/}]]; </script>
    <script th:src="@{/ruoyi/js/fast.js}"></script>
    <script th:src="@{/ajax/libs/layer/layer.min.js}"></script>

    <style>
        header {
            height: 60px !important;
        }
        /*阅读全文按钮*/
        .readall_box {  position: relative;  z-index: 9999;  padding: 0 0 0px;  margin-top: -268px;  text-align: center;  }
        .readall_box .read_more_mask {  height: 268px;  background: -moz-linear-gradient(bottom,rgba(255,255,255,.1),rgba(255,255,255,0));  background: -webkit-gradient(linear,0 top,0 bottom,from(rgba(255,255,255,0)),to(#fff));  background: -o-linear-gradient(bottom,rgba(255,255,255,.1),rgba(255,255,255,0));  }
        .readall_box a.button{cursor: pointer;}

        .thumbs-content {
            width: 291px;
            margin: 30px auto 10px;
            text-align: center;
        }
        .thumbs-button {
            background-color: #444;
        }

        .thumbs-button {
            text-align: center;
            margin: 5px auto;
            padding: 0 20px;
            line-height: 36px;
            color: #fbfbfb;
            text-decoration: none;
            font-weight: bold;
            font-size: 15px;
            border-radius: 5px;
            cursor: pointer;
            opacity: 1;
            transition: all 0.3s;
        }
        /*评论*/
        .commentGrid{ margin-bottom:20px;}
        .commentGrid .commentForm{ margin-bottom:30px;}
        .commentGrid .commentTextarea{ padding:10px 15px; font-size:14px; color:#333; line-height:18px; background:#f6f6f6; border-radius:4px; border:1px solid #ddd; width:100%; min-height:80px; margin-bottom:10px;}
        .commentGrid .commentTextarea.reply{ background:#fff; margin-top:20px;}
        .commentGrid .btnBox{ text-align:right;}
        .commentGrid .submitBtn{ display: inline-block; width:110px; height:36px; cursor:pointer; line-height:36px; text-align:center; color:#fff; font-size:14px; border-radius:18px; background:#409eff;}
        .commentGrid .submitBtn:hover{ opacity:.8;}

        .commentGrid .commentList{ padding-top:20px;}
        .commentGrid .commentList .title{ border-bottom:1px solid #eee; padding-bottom:10px; margin-bottom:20px; font-size:14px; color:#666;}
        .commentGrid .commentList .tips{text-align:center; font-size:14px; color:#999; padding:30px;}
        .commentGrid .commentGroup{ padding:15px 20px; border-left: 3px solid #ddd; background: #f6f6f6;}
        .commentGrid .commentGroup .detailText{ line-height:20px;}
        .commentGrid .commentGroup .adminText{ margin-top:10px; line-height:20px;}
        .commentGrid .itemUl{}
        .commentGrid .item{ margin-bottom:20px; padding-bottom:20px; border-bottom:1px dashed #ddd;}
        .commentGrid .username{ font-size:15px; color:#333; line-height:24px; margin-bottom:10px;}
        .commentGrid .username span{ font-size:12px; color:#999; margin-left:5px;}
        .commentGrid .username .reply{ float:right; font-size:12px; color:#999;}

        .commentGrid .moreBtn{ display:block; height:40px; cursor:pointer; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; border:1px solid #409eff; color:#409eff; font-size:14px; text-align:center; line-height:38px; transition:all .2s ease;}
        .commentGrid .moreBtn:hover{ background:#409eff; color:#fff; opacity:.9; transition:all .2s ease;}

        .commentGrid .submitBtn:hover {
            opacity: .8;
        }

        .commentGrid .submitBtn {
            display: inline-block;
            width: 110px;
            height: 36px;
            cursor: pointer;
            line-height: 36px;
            text-align: center;
            color: #fff;
            font-size: 14px;
            border-radius: 18px;
            background: #409eff;
        }

        .commentGrid .commentList {
            padding-top: 20px;
        }
        .comment-more, .no-comment {
            padding: 5px;
            text-align: center;
            background: #f5f5f5;
            color: #bbb;
            border-radius: 4px;
        }

        .commentGrid .commentList {
            padding-top: 20px;
        }
        .comment li {
            padding: 10px 0;
            border-bottom: 1px dashed #e5e5e5;
        }
        .comment-body .comment-user-img {
            float: left;
        }
        .comment-body .comment-user-img>img {
            width: 42px;
            height: 42px;
            border-radius: 50%;
        }
        .comment-body .comment-info {
            margin-left: 55px;
        }
        .comment-body .comment-info .comment-time {
            float: right;
            color: #c0c0c0;
        }
        .comment-body .comment-info .comment-content {
            color: #566573;
            margin-top: 5px;
        }
        .comment-body .comment-info .comment-footer {
            color: #999;
            text-align: right;
        }
        .comment-body .comment-info .reply, .comment-body .comment-info .cancel-reply {
            cursor: pointer;
        }
        .comment-body .comment-parent .comment-parent-content {
            padding: 5px 10px;
            background: #eeeeee;
            border-radius: 4px;
            margin: 5px 0;
        }
        .guestBookGroup .inputLabel {
            margin-bottom: 15px;
            position: relative;
            border: 1px solid #ddd;
            background: #fff;
            font-size: 12px;
            border-radius: 5px;
            -moz-border-radius: 5px;
            -webkit-border-radius: 5px;
            overflow: hidden;
            color: #333;
        }
        .guestBookGroup .inputBlock, .guestBookGroup .textareaBlock {
            display: block;
            width: 100%;
            height: 40px;
            line-height: 20px;
            padding: 10px 15px;
            background: none;
            border: 0;
        }
        .comment .user-name-content {
            margin-bottom: 10px;
            display: none;
            cursor: pointer;
        }

        .articleDetail img{margin-top: 15px;}
    </style>
</head>
<body>
<div th:replace="blog/theme/jxhx/fragments/navbar"></div>

<article>
    <!--lbox begin-->
    <div class="lbox">
        <div class="content_box whitebg">
            <h2 class="htitle" th:text="${album.albumName}"></h2>
            <!--<h1 class="con_tilte" th:text="${album.albumName}"></h1>-->
            <p class="bloginfo">

                <span class="fa fa-clock-o"></span><span th:text="${#dates.format(album.createTime,'yyyy-MM-dd')}"></span>
                <span class="fa fa-eye"></span><span th:text="${album.hit}? ${album.hit} : 0"></span>

                <span class="fa fa-heart"></span><span th:text="${album.upVote}? ${album.upVote} : 0"></span>

            </p>

            <div class="con_text">

                <div class="articleDetail"  >

                    <img class="lazy" th:each="item:${photoList}" th:alt="${item.materialName}" th:src="@{${item.savePath}}" >
                </div>
                <p></p>


               <div class="readall_box " style="display: none;">
                    <div class="read_more_mask"></div>
                    <a class="button" style="top:-25px;position:relative;">阅读全文</a>
                    <script type="text/javascript">
                        $(function () {
                            if ($(".articleDetail").height() >= 1200) {
                                $(".articleDetail").attr("style", "height:1200px;overflow-y:hidden;");
                                $(".readall_box").show();
                            }
                            $(".readall_box a.button").click(function () {
                                $(this).parents().find(".articleDetail").attr("style", "");
                                $(this).parents(".readall_box").hide();
                            });
                        })
                    </script>
                </div>

                <div class="thumbs-content">
                    <span class="thumbs-button fa fa-thumbs-up"> 点赞 <span id="loveCount" th:text="${album.upVote}"></span></span>

                </div>

            </div>
        </div>

        <div class="whitebg gbook">
            <h2 class="htitle">相册评论</h2>
            <div class="commentGrid comment" th:if="${album.commentFlag==1 || album.commentFlag=='1'}">

                <div th:if="${album.commentFlag==1 || album.commentFlag=='1'}" class="commentForm">

                    <form id="comment-form" class="form-horizontal mt-10">
                        <input id="albumId" name="tid" type="hidden" th:value="${album.albumId}">
                        <input  name="type" type="hidden" value="album">
                        <div id="user-name-content" class="user-name-content">欢迎您：<b id="user-name"></b></div>
                        <div class="guestBookGroup" id="user-info" style="display: none;padding: 0;">

                            <div class="inputLabel" style="width: 30%;float:left;margin-right:38px;">
                                <input id="nickname" type="text" class="inputBlock"  name="userName" placeholder="昵称(必填)">
                            </div>
                            <div class="inputLabel" style="width: 30%;float:left;margin-right: 38px;">
                                <input id="qq" type="text" class="inputBlock"  name="qq" placeholder="QQ（可获取头像和昵称）">
                            </div>
                            <div class="inputLabel" style="width: 30%;float:left;">
                                <input id="email" type="text" class="inputBlock"  name="email" placeholder="邮箱">
                            </div>
                        </div>

                        <textarea id="comment-textarea" class="commentTextarea"  name="content" placeholder="我来说两句~"></textarea>

                        <div class="btnBox"><input type="button" id="submitCommentBtn" class="submitBtn" name="dosubmit" value="发表评论"></div>
                    </form>

                </div>
                <hr class="hr0 mt-15"/>
               <!-- 评论列表 -->
                <div class="commentList comment"  id="commentList">

                </div>

            </div>
            <div class="commentGrid comment" th:if="${album.commentFlag==0 || album.commentFlag=='0'}">
                <p style="text-align: center">已关闭评论</p>
            </div>
        </div>

    </div>

    <div class="rbox">
        <div th:replace="blog/theme/jxhx/fragments/sidebar"></div>

    </div>

<script th:src="@{/ruoyi/js/ry-ui.js}"></script>


</article>
<div th:replace="blog/theme/jxhx/fragments/footer"></div>


<script>
    var tid='[[${album.albumId}]]';
    var comment_type="album";
    $.ajax({
        url: ctx+"blog/album/view",
        type: "post",
        dataType: "json",
        data: {"albumId":tid},
        success: function(json) {
            if(json.code!=0&&json.code!='0'){
                //console.log(json.msg);
            }
        }
    });

    $(function () {
        $(".thumbs-button").click(function () {
            $.ajax({
                url: ctx+"blog/album/upVote",
                type: "post",
                dataType: "json",
                data: {"albumId":tid},
                success: function(json) {
                    if(json.code!=0&&json.code!='0'){
                        console.log(json.msg);
                    }else{
                        $("#loveCount").text(parseInt($("#loveCount").text())+1);
                    }
                }
            });
        })
    })
</script>

<script  th:if="${album.commentFlag==1 || album.commentFlag=='1'}" th:src="@{/blog/jxhx/js/comment.js}"></script>

</body>
</html>